<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width: 600px;
            height: 300px;
            border-left: 1px solid #e7dee1;
            border-bottom: 1px solid #e7dee1;
            margin: 150px auto;
            display: flex;
            justify-content: space-around;
            align-items: flex-end;
        }
       .box div{
            width: 50px;
            height: 100px;
            background-color: pink;
            position: relative;
       }
       .box div span{
        position: absolute;
        top: -25px;
        width: 50px;
        text-align: center;
       }
       .box div p{
        position: absolute;
        bottom: -40px;
        width: 80px;
        left: -5px;
       }
    </style>
</head>
<body>
    <script>
        let arr = []
        for(let i=1;i<=4;i++){
            arr.push(+prompt(`请输入第${i}季度的产值`))
        }
        console.log(arr)
        let str =`<div class="box">`
            for(let i=0;i<arr.length;i++){
                str += `
                    <div style='height:${arr[i]}px'>
                        <span>${arr[i]}</span>
                        <p>第${i+1}季度</p>
                    </div>
                `
            }
            document.write(str)
        document.write(`</div>`)
    </script>
</body>
</html>